package com.admin.boot.modules.system.service.impl;

import com.admin.boot.modules.system.entity.SysMenuPermission;
import com.admin.boot.modules.system.mapper.SysMenuPermissionMapper;
import com.admin.boot.modules.system.service.ISysMenuPermissionService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;


/**
* (SysMenuPermission)表服务实现类
*
* @author makejava
* @since 2024-02-03
*/
@Service
public class SysMenuPermissionServiceImpl extends ServiceImpl<SysMenuPermissionMapper,  SysMenuPermission> implements ISysMenuPermissionService{


    @Override
    public List<SysMenuPermission> getByRole(String roleId) {

        LambdaQueryWrapper<SysMenuPermission> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SysMenuPermission::getRoleCode,roleId);
        return this.list(queryWrapper);
    }
}
